package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class OISDemo2 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("oos2.txt");
        ObjectInputStream ois = new ObjectInputStream(fis);
        Object ob = ois.readObject();
        Student2 str =(Student2)ob;
        System.out.println(str);
        ois.close();
    }
}
